package com.smarttiger.zero.admin.service;

import com.smarttiger.zero.admin.dao.BlackListDao;
import com.smarttiger.zero.admin.entity.BlackListModel;
import com.smarttiger.zero.admin.util.ParamNames;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import java.util.List;

@Service
public class BlackListService extends BaseService<BlackListModel>{
    @Autowired
    BlackListDao blackListDao;

    @PostConstruct
    public void initMethod(){
        super.setDao(blackListDao);
    }

    @ParamNames("id")
    public List<BlackListModel> getBlackListByInterfaceId(String id){
        return blackListDao.findAllByInterfaceId(id);
    }

}
